package com.isunland.managesystem.entity;

import android.content.Context;
import java.util.ArrayList;

public class TaskLab {
  private Context mAppContext;
  private ArrayList<Task> mTasks;
  private static TaskLab sTaskLib;

  private TaskLab(Context appContext) {
    mAppContext = appContext;
    mTasks = new ArrayList<Task>();
  }

  public static TaskLab get(Context c) {
    if (sTaskLib == null) {
      sTaskLib = new TaskLab(c.getApplicationContext());
    }
    return sTaskLib;
  }

  public ArrayList<Task> getTasks() {
    return mTasks;
  }

  public void addAll(ArrayList<Task> tasks) {
    mTasks.addAll(tasks);
  }

  public void removeAll() {
    mTasks.clear();
  }
}
